<?php
if (!defined("IN_OP"))
{
    exit("You can't access this file directly...");
}
if (!IN_3D)
{
    exit("You can't access this file directly.");
}
require_once( "class\\Rate_3d.php" );
$order = getvar("order");
$split = getvar("split");
$disk = getvar("disk");
$ratemod = getvar("ratemod");
$playtype = getvar("playtype");
$lotto_id_3d = intval(getvar("lotto_id_3d"));
if ($lotto_id_3d == "")
{
    exit();
}
$Rate_3d = new Rate_3d();
$split = isset($Rate_3d->splitArr[$split]) ? $split : 0;
$diskStr = isset($Rate_3d->diskArr[$disk]) ? $disk : 0;
$order = isset($Rate_3d->orderArr[$order]) ? $order : 0;
$ratemod = isset($Rate_3d->ratemodArr[$ratemod]) ? $ratemod : 2;
$playtype = isset($Rate_3d->playtypeArr[$playtype]) ? $playtype : "r1";
if ($disk == 0)
{
    $diskStr = "a";
}
$sObj = NULL;
$rateArr = NULL;
$tempStr = "";
switch ($playtype)
{
    case "r1" :
        require_once( "class\\SRate1_3d.php" );
        if ($ratemod == 2)
        {
            $sObj = new SRate1_3d($diskStr, $lotto_id_3d);
            $rateArr = $sObj->getRates($lotto_id_3d);
        }
        else
        {
            if ($ratemod == 0)
            {
                
            }
            else
            {
                
            }
        }
        break;
    case "r2p" :
        break;
    case "r2" :
        break;
    case "r3p" :
        break;
    case "r3" :
        break;
    case "g3" :
        break;
    case "g6" :
        break;
    default :
        break;
}
$tempStr = "[";
foreach ($rateArr as $key => $val)
{
    $tempStr .= "[\"" . $key . "\",\"" . $val . "\"], ";
}
if (substr($tempStr, 0 - 2) == ", ")
{
    $tempStr = substr($tempStr, 0, strlen($tempStr) - 2);
}
$tempStr .= "]";
echo $tempStr;
?>